Michael Collins
Kuwago Web Services
Seattle, WA USA
www.lassodev.com

July 31, 2001 

Lasso 5 Glossary for BBEdit

Version 1.0 (BETA)

_____ Requirements _____ 

Macintosh OS (8/9 or X)
BBEdit 6.x+ - Bare Bones Software
Lasso Professional 5.x+ - BlueWorld Communications

***** BETA RELEASE ****

This is a draft of a Glossary for Lasso 5. I still do not have all the details for all tags and there will be changes yet to come as development of the final Lasso Professional 5 product unfolds. I wouldn't do much to begin customizing these for your own use. You might consider creating a new folder for your own Glossary items and then can incorporate those into my final version when it becomes available. 

For the most part, these tags are organized according to the same tag categories used by Blue World on the tag list released with the LP5 Alpha. I hope that makes it easier to find the tag you are looking for. I prefer to keep the command tags on their own so I have rearranged those for  convenience of development.

I have not yet included folders of SSJS tags as SSJS is not yet available. I am not sure yet if there will be any changes to SSJS. 

Please contact me with any comments, suggestions, or corrections:

mcollins@kuwago.com

The following is what the read me will contain, some of the details though are not currently correct for the alpha version.

DRAFT

_____ Description _____ 

This is a set of files that can be used with BBEdit (6.x+) to provide a list of Lasso markup tags (otherwise referred to as LDML) within your editing environment. The set of tags includes all LDML tags as of Lasso Professional 5, along with a number of JavaScript, SSJS, and HTML tags relevant to working with Lasso. With my list of tags present in the "BBEdit Glossary" folder, you can double-click or drag useful Lasso code and tags into a file. You can also readily edit the selections and add your own code snippets. 

_____ Updates _____ 

This collection of files is under continual refinement and is updated regularly. The latest copy is available at:

http://www.lassodev.com/ 

I will update the set of tags for BBEdit 5.0 and 5.1. If you want my latest set you will need to update to BBEdit 6.0. If you attempt to use my new set of BBEdit Glossary files with BBEdit version 5.1 it will work but new keywords added to BBEdit 6 will be inserted as text (see discussion below). You could do a global search and replace to remove those new keywords and thus use the new set of glossary files with BBEdit 5.0 or 5.1.

_____ Instructions _____ 

Unstuff the archive (it is a Stuffit Expander 6 archive). Drag the folders within "Put in BBEdit Glossary" into the "BBEdit Glossary" folder (that is created by BBEdit when the application is installed). Open BBEdit and look under the "Windows" menu and select "Glossary" to open the Glossary palette. Select LDML_5x.lasso from the "Set" pop-up list and then use the arrow to open folders to reveal or collapse the contents of the sub-glossary items. Double-click an item to insert, highlight the item and select "insert", or simply select an item and drag it over.

It is very easy to customize this list to your own liking. You may retain the "LDML_5x.lasso" folder or take all the sub-folders out so they can be accessed as separate sets. Add a folder to change the hierarchy of the glossary items, nest them however deep you want. Add new files by simply creating a new BBEdit file and placing within a folder or sub-folder within the glossary. The name of the file becomes the name of the item on the list.  Organize the files as you wish, the changes take place immediately. There is no need to restart BBEdit (though you may need to open and close the glossary window if you add new files or change file names).

Many of the items will include selected text along with what is added by the glossary item. To do this, first select a section of text and then inserting the glossary item. Whatever text you had highlighted is inserted to a per-determined location within the tag. Other pieces of text will be highlighted after a Glossary item is inserted to indicate it is a custom value that you will probably want to change.

To edit any file, hold down the option key when you double click (the "insert" button should change to "open"), or simply open the file as any other text file. There are several special keywords used to control the behavior of a particular item. The ones which I frequently use are:

#indent# - Adds tabs so that the inserted item is indented to the same extent as the previous line.

#select# - Pastes in whatever text was selected when the glossary item was inserted into the document.

#insertion# - Determines the location of the cursor after an item is inserted. Note that although you can have multiple #insertion# though I have not done so in my files.

#selstart# and #selend# - Allows for a section of text to appear highlighted after the glossary item was inserted into the document. This allows you to quickly type over the text which is highlight, this text usually indicates the type of value that is needed. 

#inline# - Removes all trailing vertical white space in the entry before inserting it. This is useful if you want inline glossary entries and normally leave "Force CR at End" turned on in the filing preferences. 

I tend to not use the #select# keyword in the middle of a tag because I was having a problem with knowing whether what I selected was included or not and it became unpredictable in many cases. However, I do use the #select# keyword for many container tags where you most likely will want to have some selected text inserted between the opening and closing tags.  For example, the definition for the item labeled "[if String_Length () = 0]" has the following:

#indent#[if:(String_Length:(var:'#selstart#MyVar#selend#',encodenone))=='0']
	#select#
[else]
[/If]

When inserted into a file, any text that is selected when this is invoked will be placed between the [if:...] and [else] tags.  In addition, the #selstart##selend# keywords will cause the text "MyVar" to be highlighted. Furthermore, #indent# causes the entire segment of code to be offset with the number of indents in the previous line. For example, if I have the following on some file:

	<input type="text" size="20" name="MyField" value="">
	<font size="+1" face="Arial" color="#CC0000">Hey fix it</font>

Then I select everything between <font... and </font> and insert the item labeled "[if String_Length () = 0]" I get the following result (with the text "MyVar" highlighted):
		
	<input type="text" size="20" name="MyField" value="">
	[if:(String_Length:(var:'MyVar',encodenone))=='0']
		<font size="+1" face="Arial" color="#CC0000">Hey fix it</font>
	[else]
	[/If]

If you don't like this behavior you are of course free to go back and change it to insert the selected text for the tags you feel it is appropriate. See the BBEdit User Manual for additional keywords and a more in depth description.

_____ Background _____ 

My inspiration to do this was the Tool extensions for Lasso LDML Tags put together by Mike Duncan in February, 1999. I had planned to edit that set of tools but then realized, through the help of Mike, that I could reproduce this set much more easily using the Glossary window that is already present in BBEdit. The files you have now are a result of constant revisions to hone what I feel is most useful to have handy when creating LDML format files in BBEdit. I usually make changes as I work on projects and have had a number of revisions to these files as I tweak the code and add any new tags from BlueWorld.

The syntax is based on the contents of the Blue World reference database "LDML 3.5 Ref. DB v1.0.1.fp3". However, I heavily rearranged the tag ordering and changed syntax to what I thought would be helpful. I also added a number of shortcut replacements, for example, the section of code that is used when putting JavaScript at the top of a file. This is not a definitive list of LDML tags, but I have tried to include them all. I have moved the more obscure tags to sub-folders so that the more commonly used tags are easier to find.

In editing the syntax I have tended to use the abbreviated version of tags and to use parentheses for substitution tags. This makes it easier to insert the tag into inline statements. Inline construction of LDML syntax is the preferred approach. 

These files used to use the <ldml tag=""> alternate syntax that is more comparable with GUI text editors. However, I have removed almost all of this due to the fact that the more recent GUI editors can be configured to ignore Lasso tags. And also because the syntax is more difficult to read in the BBEdit editor.

The set of files created for SSJS tags are based on the SSJS RoadMap provided by BlueWorld in their documentation for extending Lasso. It is only a quick listing of the tags and I am not sure how complete it is. Note that if you don't think you will ever use SSJS then you can remove the sub-folder.
